import request from '../utils/request.js'

export const addAssistantService = (assistantData) => {
    return request.post('/robots/addAssistant', assistantData);
}

export const selectAllService = () => {
    const email = sessionStorage.getItem('user');
    return request.post('/robots/getAssistant',{email:email});
}

export const editAssistantService = (assistantData) => {
    return request.post('/robots/updateAssistant', assistantData);
}

export const deleteAssistantService = (assistantData) => {
    return request.post('/robots/deleteAssistant', assistantData);
}

export const selectVoices = ()=>{
    return request.get('/voice/getVoices');
}


export const getSettingService = (data) =>{
    return request.post('/robots/getSetting', data);
}

export const updatePersonaService = (data)=>{
    return request.post('/robots/updatePersona',data);
}

export const updateVoiceConfigService = (data) =>{
    return request.post('/robots/updateVoiceConfig',data);
}

export const selectVoiceById=(data)=>{
    return request.post('/voice/getVoice',data);
}

export const updateVoiceConfigSpeedAndVolumnService = (data)=>{
    return request.post('/robots/updateConfigSpeedAndVolume',data);
}

